/**
 * Created by Freeman on 2016/8/12.
 */
import React, {PropTypes} from 'react'
const LoadMore = (props) => {

    const {isFetching, addData} = props;
    return (
        <div className="load-more">
            <button className="ladda-button" onClick={(e) =>addData(e)}>
                {
                    isFetching ?
                        <span className="ladda-spinner">
		  		            <i className="fa fa-spinner fa-spin"></i>
		  	            </span>
                        :
                        <span className="ladda-label">点击查看更多</span>
                }
            </button>
        </div>
    )
};
LoadMore.propTypes = {
    isFetching:PropTypes.bool.isRequired,
    addData:PropTypes.func.isRequired
};

export default LoadMore